import request from "@/utils/request";
// 通过userId获得地址
export function getAddress(params){
    return request({
        url:'/address',
        params
    })
}
// 删除地址
export function deleteAddress(params){
    return request({
        url:"/address",
        method:'delete',
        params
    })
}

// 通过id获得地址
export function getAddressById(params){
    return request({
        url:"/address/get-address",
        params
    })
}

// 更新地址
export  function updateAddress(data){
    return request({
        url:'/address/',
        method:'put',
        data
    })
}

// 新增地址
export function addAddress(data){
    return request({
        url:'/address/add-address',
        method:'post',
        data
    })
}